Differentiated graders, LLM-driven inference, and API improvements - #1
Merged
Conversation
- Differentiate graders with task-specific scoring logic (easy/medium/hard/plus) - Rewrite inference.py with genuine LLM-driven contract analysis using structured JSON output, system prompts, adaptive strategy, and retry logic - Add /tasks endpoint to the FastAPI server with task metadata - Add 7 new tests covering differentiated graders, tasks endpoint, and trap-resolution behaviour - Improve README with comprehensive documentation - Environment now uses task-specific graders via task.grade() in step() Agent-Logs-Url: https://github.com/bigturtle679/Contract-Negotiation-Environment/sessions/625fe71f-e42b-4f9e-9af8-fd478becb5af Co-authored-by: AbeerChaturvedi <171315954+AbeerChaturvedi@users.noreply.github.com>
…ing to LLM calls Agent-Logs-Url: https://github.com/bigturtle679/Contract-Negotiation-Environment/sessions/625fe71f-e42b-4f9e-9af8-fd478becb5af Co-authored-by: AbeerChaturvedi <171315954+AbeerChaturvedi@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
AbeerChaturvedi
April 11, 2026 06:32
View session
bigturtle679
marked this pull request as ready for review
April 11, 2026 06:53
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Submission was functional but on the waiting list due to quality. The core issues: all five graders were identical pass-throughs, the inference agent used hardcoded action sequences with a dummy LLM call, and the API surface was minimal.
Graders (
graders.py)grade_actionidentically_HARD_UNRESOLVED_TRAP_PENALTY = 0.5, etc.)Inference (
inference.py)except: passEnvironment (
environment.py)step()now delegates to task-specific graders viatask.grade()instead of always using genericevaluate_actionServer (
server/app.py)GET /tasksendpoint exposing task metadata (id, clause_type, risk_level, has_grader)Tests
/tasksendpoint, trap-resolution validation, all-tasks-have-graders assertionDocs